//
//  DUTextLayer.swift
//  SimpleCal
//
//  Created by 杜晓祥 on 2021/12/2.
//

import Cocoa

class DUTextLayer: CATextLayer {
    
    
    
    override func draw(in ctx: CGContext) {
        let height = self.bounds.size.height
        let fontSize = self.fontSize
        let yDiff = (height - fontSize)/2 - fontSize/10
        ctx.saveGState()
        ctx.translateBy(x: 0, y: yDiff)
        super.draw(in: ctx)
        ctx.restoreGState()
        
    }
    
}
